package com.yanqu.timer;

import com.yanqu.manager.UserGetGoodsMonitorMgr;
import com.yanqu.manager.UserGoodsMonitorSettingMgr;
import com.yanqu.road.server.TempMgr;
import com.yanqu.road.utils.executor.GeneralTask;

import java.util.ArrayList;
import java.util.List;

public class SaveDataTask extends GeneralTask {

    @Override
    public void doRun() {
        List<TempMgr> list = new ArrayList<>();
        list.add(new UserGetGoodsMonitorMgr());
        list.add(new UserGoodsMonitorSettingMgr());

        for (TempMgr mgr : list) {
            try {
                mgr.save();
            }catch (Exception e){
                getLOGGER().error("", e);
            }
        }
    }
}
